home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
QUERY.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-23
|
3KB
|
110 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: query.c
// Title: Application Template
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
// This module contains the program entry point for
//
// The code in this module may be written in C++ or C.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
//
//----------------------------------------------------------------------------
#include <base.h>
//----------------------------------------------------------------------------
// Stack size
//----------------------------------------------------------------------------
#if COMPILER_BORLAND && (OS_DOS || OS_WINDOWS)
unsigned _stklen = 0x4000;
#endif
//----------------------------------------------------------------------------
// Globals
//----------------------------------------------------------------------------
//
// A useless string which is simply embedded in the executable.
//
PSZ __pszCredits__ = "Written by John M Weeder, 1993";
//
// This should contain a program description which will be displayed as
// part of the program's help text.
//
static PCSZ pcszDescription =
"This program generates the correct response for a remote query.";
//
// Program command line options
//
static CHAR szQuery[81];
static CHAR szKey[81];
static BS_CMDOPT acmdopt[] =
{
{ "query", (PVOID)szQuery, CMDOPT_FILESPECR(80), "Query."},
{ "key", (PVOID)szKey, CMDOPT_FILESPECR(80), "Key."},
BS_CMDOPT_NULL,
};
//----------------------------------------------------------------------------
// Description: main() - Program entry point
// Parameters: Standard C parameters
// Returns: DOS return code.
//----------------------------------------------------------------------------
int main(int argc, char **argv)
{
static BS_CFG cfg = CFG_DFT;
//
// Initialize base library
//
BaseLibraryInitialize(argc, argv, &cfg);
BaseTitle("$Revision: 93.1 $", __DATE__, __TIME__, "Coded Query Response Utility");
if (!BaseTitleHelp(acmdopt, pcszDescription))
return 99;
strupr(szQuery);
Output(" INPUT: %s\n", szQuery);
Output(" KEY: %s\n", szKey);
QueryResponse(szQuery, szKey);
Output("RESPONSE: %s\n", szQuery);
return 0;
}
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------